package cn.gson.springboot.model.pjos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "zshipments", schema = "springboot", catalog = "")
public class ZshipmentsEntity {
    private int shipmentsId;
    private Integer chukuId;//出库单
    private Integer orderId;//订单
    private Integer clientId;//交付id
    private String shipmentsShipper;
    private Timestamp shipmentsTime;//发货时间
    private String shipmentsConsignee;
    private String shipmentsPhone;
    private String shipmentsNation;
    private String shipmentsProvince;
    private String shipmentsCity;
    private String shipmentsSite;
    private String shipmentsPostcode;
    private String shipmentsMode;
    private String shipmentsState;//状态
    private Integer shipmentsNumber;//收货人id
    private BigDecimal shipmentsWeight;//总金额
    private String shipmentsFirm;
    private String shipmentsNumbers;
    private BigDecimal shipmentsMoney;
    private String shipmentsRemark;

    @Id
    @Column(name = "shipments_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getShipmentsId() {
        return shipmentsId;
    }

    public void setShipmentsId(int shipmentsId) {
        this.shipmentsId = shipmentsId;
    }

    @Basic
    @Column(name = "chuku_id", nullable = true)
    public Integer getChukuId() {
        return chukuId;
    }

    public void setChukuId(Integer chukuId) {
        this.chukuId = chukuId;
    }

    @Basic
    @Column(name = "order_id", nullable = true)
    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "client_id", nullable = true)
    public Integer getClientId() {
        return clientId;
    }

    public void setClientId(Integer clientId) {
        this.clientId = clientId;
    }

    @Basic
    @Column(name = "shipments_shipper", nullable = true, length = 1024)
    public String getShipmentsShipper() {
        return shipmentsShipper;
    }

    public void setShipmentsShipper(String shipmentsShipper) {
        this.shipmentsShipper = shipmentsShipper;
    }

    @Basic
    @Column(name = "shipments_time", nullable = false)
    public Timestamp getShipmentsTime() {
        return shipmentsTime;
    }

    public void setShipmentsTime(Timestamp shipmentsTime) {
        this.shipmentsTime = shipmentsTime;
    }

    @Basic
    @Column(name = "shipments_consignee", nullable = true, length = 1024)
    public String getShipmentsConsignee() {
        return shipmentsConsignee;
    }

    public void setShipmentsConsignee(String shipmentsConsignee) {
        this.shipmentsConsignee = shipmentsConsignee;
    }

    @Basic
    @Column(name = "shipments_phone", nullable = true, length = 1024)
    public String getShipmentsPhone() {
        return shipmentsPhone;
    }

    public void setShipmentsPhone(String shipmentsPhone) {
        this.shipmentsPhone = shipmentsPhone;
    }

    @Basic
    @Column(name = "shipments_nation", nullable = true, length = 15)
    public String getShipmentsNation() {
        return shipmentsNation;
    }

    public void setShipmentsNation(String shipmentsNation) {
        this.shipmentsNation = shipmentsNation;
    }

    @Basic
    @Column(name = "shipments_province", nullable = true, length = 15)
    public String getShipmentsProvince() {
        return shipmentsProvince;
    }

    public void setShipmentsProvince(String shipmentsProvince) {
        this.shipmentsProvince = shipmentsProvince;
    }

    @Basic
    @Column(name = "shipments_city", nullable = true, length = 15)
    public String getShipmentsCity() {
        return shipmentsCity;
    }

    public void setShipmentsCity(String shipmentsCity) {
        this.shipmentsCity = shipmentsCity;
    }

    @Basic
    @Column(name = "shipments_site", nullable = true, length = 1024)
    public String getShipmentsSite() {
        return shipmentsSite;
    }

    public void setShipmentsSite(String shipmentsSite) {
        this.shipmentsSite = shipmentsSite;
    }

    @Basic
    @Column(name = "shipments_postcode", nullable = true, length = 1024)
    public String getShipmentsPostcode() {
        return shipmentsPostcode;
    }

    public void setShipmentsPostcode(String shipmentsPostcode) {
        this.shipmentsPostcode = shipmentsPostcode;
    }

    @Basic
    @Column(name = "shipments_mode", nullable = true, length = 1024)
    public String getShipmentsMode() {
        return shipmentsMode;
    }

    public void setShipmentsMode(String shipmentsMode) {
        this.shipmentsMode = shipmentsMode;
    }

    @Basic
    @Column(name = "shipments_state", nullable = true, length = 1024)
    public String getShipmentsState() {
        return shipmentsState;
    }

    public void setShipmentsState(String shipmentsState) {
        this.shipmentsState = shipmentsState;
    }

    @Basic
    @Column(name = "shipments_number", nullable = true)
    public Integer getShipmentsNumber() {
        return shipmentsNumber;
    }

    public void setShipmentsNumber(Integer shipmentsNumber) {
        this.shipmentsNumber = shipmentsNumber;
    }

    @Basic
    @Column(name = "shipments_weight", nullable = true, precision = 2)
    public BigDecimal getShipmentsWeight() {
        return shipmentsWeight;
    }

    public void setShipmentsWeight(BigDecimal shipmentsWeight) {
        this.shipmentsWeight = shipmentsWeight;
    }

    @Basic
    @Column(name = "shipments_firm", nullable = true, length = 1024)
    public String getShipmentsFirm() {
        return shipmentsFirm;
    }

    public void setShipmentsFirm(String shipmentsFirm) {
        this.shipmentsFirm = shipmentsFirm;
    }

    @Basic
    @Column(name = "shipments_numbers", nullable = true, length = 1024)
    public String getShipmentsNumbers() {
        return shipmentsNumbers;
    }

    public void setShipmentsNumbers(String shipmentsNumbers) {
        this.shipmentsNumbers = shipmentsNumbers;
    }

    @Basic
    @Column(name = "shipments_money", nullable = true, precision = 2)
    public BigDecimal getShipmentsMoney() {
        return shipmentsMoney;
    }

    public void setShipmentsMoney(BigDecimal shipmentsMoney) {
        this.shipmentsMoney = shipmentsMoney;
    }

    @Basic
    @Column(name = "shipments_remark", nullable = true, length = 1024)
    public String getShipmentsRemark() {
        return shipmentsRemark;
    }

    public void setShipmentsRemark(String shipmentsRemark) {
        this.shipmentsRemark = shipmentsRemark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZshipmentsEntity that = (ZshipmentsEntity) o;
        return shipmentsId == that.shipmentsId &&
                Objects.equals(chukuId, that.chukuId) &&
                Objects.equals(orderId, that.orderId) &&
                Objects.equals(clientId, that.clientId) &&
                Objects.equals(shipmentsShipper, that.shipmentsShipper) &&
                Objects.equals(shipmentsTime, that.shipmentsTime) &&
                Objects.equals(shipmentsConsignee, that.shipmentsConsignee) &&
                Objects.equals(shipmentsPhone, that.shipmentsPhone) &&
                Objects.equals(shipmentsNation, that.shipmentsNation) &&
                Objects.equals(shipmentsProvince, that.shipmentsProvince) &&
                Objects.equals(shipmentsCity, that.shipmentsCity) &&
                Objects.equals(shipmentsSite, that.shipmentsSite) &&
                Objects.equals(shipmentsPostcode, that.shipmentsPostcode) &&
                Objects.equals(shipmentsMode, that.shipmentsMode) &&
                Objects.equals(shipmentsState, that.shipmentsState) &&
                Objects.equals(shipmentsNumber, that.shipmentsNumber) &&
                Objects.equals(shipmentsWeight, that.shipmentsWeight) &&
                Objects.equals(shipmentsFirm, that.shipmentsFirm) &&
                Objects.equals(shipmentsNumbers, that.shipmentsNumbers) &&
                Objects.equals(shipmentsMoney, that.shipmentsMoney) &&
                Objects.equals(shipmentsRemark, that.shipmentsRemark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(shipmentsId, chukuId, orderId, clientId, shipmentsShipper, shipmentsTime, shipmentsConsignee, shipmentsPhone, shipmentsNation, shipmentsProvince, shipmentsCity, shipmentsSite, shipmentsPostcode, shipmentsMode, shipmentsState, shipmentsNumber, shipmentsWeight, shipmentsFirm, shipmentsNumbers, shipmentsMoney, shipmentsRemark);
    }
}
